#pragma once

#include "Villager.h"
#include "time.h"
#include <list>
#include <iostream>
#include "../../../Terrain.h"
#include <cmath>
#include "../../../scene/Timer.h"
#define PI 3.14159265

#define READY 0
#define TO_TREE 1
#define FROM_TREE 2
#define DONE 3
#define NOTHING 4

#define IDLE 0
#define INWORK 1

class Gatherer: public Villager
{
public:
	Gatherer(glm::vec3 _Pos, float _r, float _speed, std::string _Name,
			std::string _modelFName, ModelPool *_mPool, PathFinder *_pathfinder,
			Terrain::Terrain *_ter);

	~Gatherer(void);

	virtual void control(float t);
	virtual void goTo(glm::vec2 pos);

	//Simple ai functions for gathering resources 
	void doWood();
	void setWork(glm::vec2 sTreePosition, glm::vec2 sGatherPosition);

	bool doCut();
	void doSleep();
	void doRun();
	void doThink();
	int getStatus();

protected:

	glm::vec2 TreePosition;
	glm::vec2 GatherPosition;
	Timer Lumbertime;

};

